package xjay.ai.emotionalsupport.tools;

import jakarta.annotation.Resource;
import org.springframework.ai.support.ToolCallbacks;
import org.springframework.ai.tool.ToolCallback;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.tools.Tool;

@Configuration
public class ToolRegistration {

    @Resource
    private WebSearchTool webSearchTool;
    @Resource
    private FileTool fileTool;
    @Resource
    private TerminateTool terminateTool;
    @Resource
    private TarotCardTool tarotCardTool;
    @Bean("allTools")
    public ToolCallback[] allTools() { //工厂方法
        return ToolCallbacks.from(
               // fileTool,
                webSearchTool
        );
    }

    @Bean("agentTools")
    public ToolCallback[] agentTools() {
        return ToolCallbacks.from(
                webSearchTool,
                terminateTool,
                tarotCardTool
        );
    }

    @Bean("customizeAgentTools")
    public ToolCallback[] customizeAgentTools() {
        return ToolCallbacks.from(
                webSearchTool,
                terminateTool
        );
    }

    @Bean("maidAgentTools")
    public ToolCallback[] maidAgentTools() {
        return ToolCallbacks.from(
                webSearchTool,
                terminateTool
        );
    }
}
